package server;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;


public class InvisibleClient {
	private Socket serverSocket;
	private int port;
	private String IP;
	

	public InvisibleClient(int port, String IP) {
		this.IP = IP;
		this.port = port;
	}
 
	public boolean connectToServer() {
		try { 
			serverSocket = new Socket(InetAddress.getByName(IP), port);			
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block			
		} catch (IOException e) {
			// TODO Auto-generated catch block			
		}
		if (serverSocket != null)
			return true;
		return false;
	}
	
	/*public static void main(String[] args) {
		InvisibleClient cl = new InvisibleClient(8124,"127.0.0.1");
		cl.connectToServer();
	}*/
}
